package com.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Ren(任佳宝)
 * @Description: GulimallWebConfig
 * @Date: 2025/2/7 上午10:10
 * @Version: 1.0
 */
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {
/*
    @GetMapping("/login.html")
    public String loginPage() {

        return "login";
    }

    @GetMapping("/reg.html")
    public String regPage() {

        return "reg";
    }*/

    /**
     * 视图映射
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {

        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }
}
